/**
 * Beijing Jiaotong University
 * Copyright (c) 1896-2016 All Rights Reserved.
 */
package org.hh.ws.invoker.client.impl;

import javax.annotation.Resource;

import org.hh.ws.invoker.client.UserFacadeClient;
import org.myws.dao.mybatis.domain.User;
import org.myws.facade.UserFacade;
import org.myws.service.common.facade.dto.PageDTO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;

/**
 * 
 * @author HuHui
 * @version $Id: UserFacadeClientImpl.java, v 0.1 2016年5月8日 下午1:39:54 HuHui Exp $
 */
@Service
public class UserFacadeClientImpl implements UserFacadeClient {

    private static final Logger log = LoggerFactory.getLogger(UserFacadeClientImpl.class);

    @Resource
    private UserFacade          userFacade;

    /** 
     * @see org.hh.ws.invoker.client.UserFacadeClient#getUserById(java.lang.Long)
     */
    @Override
    public User getUserById(Long id) {
        User user = userFacade.getUserById(id);
        log.info("查询结果, user={}", user);
        return user;
    }

    @Override
    public PageDTO<User> getUser(int pageNum, int pageSize) {
        PageDTO<User> users = userFacade.getUser(pageNum, pageSize);
        log.info("查询结果, users={}", users);
        return users;
    }

}
